package com.app.acitivty;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.app.activity.R;
import com.app.components.TopMenu;
import com.app.data.LineItem;
import com.app.service.BaseService;
import com.app.utils.ActivityTools;
import com.app.utils.GlobalConstants;

/**
 * 线路详情
 * @author Administrator
 *
 */
public class LineDetailActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.line_detail);
		TopMenu topMenu = new TopMenu(this, "返回", new OnClickListener() {

			@Override
			public void onClick(View v) {
				LineDetailActivity.this.finish();

			}
		}, R.drawable.top_button_unselect, R.drawable.top_button_selected, "",80);
		topMenu.onCreate();
		LineItem item = GlobalConstants.getInstance().getLineitem();
		
		ImageView imgView = (ImageView)findViewById(R.id.imgLineLogo);
		imgView.setImageBitmap(item.getIconbitmap());
		
		
		
		TextView nameView = (TextView)findViewById(R.id.nameLineLogo);
		nameView.setText(item.getLineName());
		
		WebView webView = (WebView)findViewById(R.id.tvlinewebView);
		webView.loadDataWithBaseURL(BaseService.url_base, item.getLineHtml(), "text/html", "utf-8","www.lijiang.com");
//		TopMenu topMenu=new TopMenu(this,"套餐详情",new OnClickListener() {
//			
//			@Override
//			public void onClick(View v) {
//				LineDetailActivity.this.finish();
////				ActivityTools.gotoActivity(LineDetailActivity.this, HotActivity.class);
//				
//			}
//		},R.drawable.top_button_unselect,R.drawable.top_button_selected,"");
//		topMenu.onCreate();
		//setContentView(R.layout.line_detail);
	}
	
}
